/*
* Copyright (c) 2010 Michael Collins
*
* This file is part of TerraFirma.
*
* TerraFirma is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* TerraFirma is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with TerraFirma.  If not, see <http://www.gnu.org/licenses/>.
*/

/**entity_data
 * This is a construct used specifically to syncronize the tables of objects in lua across hosts
 * It has no use on the C backend whatsoever. It is just heavily useful for our lua programmers
 * to be able to share any arbitrary data they feel like across all hosts
 *
 * This is achieved through the use of the lua userdata type. Each entity has a pointer to it's own
 * shared data (or NULL if unneeded) and the lua entity can allocate as much space as it needs. Lua
 * entities can then store or recall data from this buffer at any time, and when a change occurs on
 * the server's implementation of the entity data, the clients data changes transparently as well
 * The lua programmer just needs to keep track of where the data is in the entity data buffer and how
 * to get it out.
 */
#ifndef ENTITY_DATA_H
#define ENTITY_DATA_H

namespace game
{

    class entity_data
    {
    public:
        entity_data();
        ~entity_data();

        unsigned int size;
        char buffer[1]; //This doesn't actually reflect the actual size of the buffer data, as that is determined
        //at the time of allocation. We just want to be able to address into this arbitrary space.
    protected:
    private:
    };

}
#endif // ENTITY_DATA_H
